
package com.vitas.coin.util;

import android.graphics.Outline;
import android.graphics.Rect;
import android.view.View;

public class RenderViewOutlineProvider extends android.view.ViewOutlineProvider {
    private float mRadius;

    public RenderViewOutlineProvider(float radius) {
        this.mRadius = radius;
    }

    @Override
    public void getOutline(View view, Outline outline) {
        Rect selfRect = new Rect(0, 0, view.getMeasuredWidth(), view.getMeasuredHeight());
        outline.setRoundRect(selfRect, mRadius);
    }
}